[Python]Download an image embedded in a mime multipart message

Posted by michele on Stack Overflow See other posts from Stack Overflow or by michele
Published on 2010-05-18T15:14:14Z Indexed on 2010/05/19 8:40 UTC
Read the original article Hit count: 318

Filed under:
|
|
|
|

Hi, I have to download some images from links. This links return me a file where is embedded a multipart mime and a tiff image. I have writed this code but it downloads the file with mime.

How I can remove the mime from this file and have the image returned? Can I do this with wget or curl?

My code: def download(url,local): import urllib urllib.urlretrieve(url,local)
urllib.urlcleanup()

Thanks a lot.

© Stack Overflow or respective owner

Related posts about python

Related posts about download